OpenSlotSync
Boolean async ; 0=await completion; 1=immediate return OpenSlot is the same as PBOpen except that you use it when opening bus slot devices. It sets the IMMED bit to signal an extended parameter block.
pb is the address of a parameter block. The following fields are
relevant:
Out-In Name Type Size Offset Description
-> ioCompletion ProcPtr 4 12 Completion routine address (if async =TRUE) <- ioResult OSErr 2 16 Error Code (0=no error, 1=not done yet) -> ioNamePtr StringPtr 4 18 Address of device driver name <- ioRefNum short 2 24 Receives driver reference number
-> ioPermssn SignedByte 1 27 Rd/Wrt permission (1=read, 2=write, et.al.) Additionally, if the slot resource serves a single device, there is an extension that
includes:
-> ioMix ProcPtr 4 28 Reserved for the driver open routine -> ioFlags short 2 32 Cleared to indicate single slot device
-> ioSlot SignedByte 1 34 Slot number for device being opened If the slot resource serves more than one device, there is an extension that includes:
-> ioMix ProcPtr 4 28 Reserved for the driver open routine -> ioFlags short 2 32 Cleared to indicate single slot device
-> ioSEBlkptr ProcPtr 4 34 Address of external parameter block async is a Boolean value. Use FALSE for normal (synchronous) operation or TRUE to enqueue the request and resume control immediately. See Async I/O.
noErr (0) No error
badUnitErr (-21) refNum doesn't match unit table
unitEmptyErr (-22) refNum specifies NIL handle in unit table
openErr (-23) Requested Read/Write permission and the driver's Open t
permissions don't match
dInstErr (-26) Couldn't find driver in resource file
Notes: OpenSlot opens a bus-based slot device driver when used by the Device